package com.cncn.youmengsharelib;

import android.graphics.Bitmap;
import android.text.TextUtils;
import android.util.Log;

import java.io.Serializable;

/**
 * 分享数据entity，当前的分享数据包括：
 *
 * @author PengWeiwei
 *
 * @version 1.0.0
 *
 * @date 2014-12-1
 */
public class ShareData implements Serializable{
	private String imageUrl = "";
	private String content = "";
	private String title = "";
	private String targetUrl = "";
	private Bitmap imageBitmap = null;

	public Bitmap getImageBitmap() {
		return imageBitmap;
	}

	public void setImageBitmap(Bitmap imageBitmap) {
		this.imageBitmap = imageBitmap;
	}

	public ShareData(String title0, String content0, String imageUrl0, String targetUrl0) {
		imageUrl = imageUrl0;
		title = title0;
		content = content0;
		targetUrl = targetUrl0;
		if (TextUtils.isEmpty(content)) {
			Log.w("ShareData", "Create shareData : QQ分享、 qq空间、 微信等的content不能为空， 可能分享失败，一闪而过");
		}
	}

	public ShareData(String title0, String content0, Bitmap imageBitmap0, String targetUrl0) {
		imageBitmap = imageBitmap0;
		title = title0;
		content = content0;
		targetUrl = targetUrl0;
		if (TextUtils.isEmpty(content)) {
			Log.w("ShareData", "Create shareData : QQ分享、 qq空间、 微信等的content不能为空， 可能分享失败，一闪而过");
		}
	}

	public String getTargetUrl() {
		return targetUrl;
	}

	public void setTargetUrl(String targetUrl) {
		this.targetUrl = targetUrl;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getImageUrl() {
		return imageUrl;
	}

	public void setImageUrl(String imageUrl) {
		this.imageUrl = imageUrl;
	}

	@Override
	public String toString() {
		return "ShareData{" +
				"imageUrl='" + imageUrl + '\'' +
				", content='" + content + '\'' +
				", title='" + title + '\'' +
				", targetUrl='" + targetUrl + '\'' +
				", imageBitmap=" + imageBitmap +
				'}';
	}
}
